<?php
namespace app\components;

use Qiniu\Auth;
use Qiniu\Storage\UploadManager;


/**
 * 日期辅助类
 */
class Dates extends \yii\base\Widget
{

    /**
     * Starts recording a block.
     */
    public function init()
    {
    }

    public function prDates($start,$end){ // 两个日期之间的所有日期  
        $dt_start = strtotime($start);  
        $dt_end = strtotime($end);  
        
        $arr = [];
        while ($dt_start<=$dt_end){  
            //echo date("Y-m-d",$dt_start);echo "<br>";
            $arr[] = date("Y-m-d",$dt_start); 
            $dt_start = strtotime('+1 day',$dt_start);  
            //$dt_start = strtotime($dt_start);  
            //$arr[] = date("Y-m-d",$dt_start); 
        }
        return $arr;
    }


}
